home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Dev / misc / temgen.lha / Temgen / tg-0.11 / alloc.h < prev    next >
C/C++ Source or Header  |  2002-12-18  |  855b  |  35 lines

  1. #ifndef __alloc_h_
  2. #define __alloc_h_
  3.  
  4. /* macros for memory allocation debugging */
  5.  
  6. /* #define  MALLOC_DEBUG 1 */
  7.  
  8. #ifndef  MALLOC_DEBUG
  9.  
  10. #define      MALLOC         malloc
  11. #define     REALLOC        realloc  
  12. #define      CALLOC         calloc
  13. #define        FREE           free
  14. #define      STRDUP         strdup
  15. #define      ALLOCA         alloca
  16.  
  17. #else
  18.  
  19. void *malloc_wrapper( unsigned );
  20. void *alloca_wrapper( unsigned );
  21. void *realloc_wrapper( void*, unsigned );
  22. void *calloc_wrapper( unsigned, unsigned );
  23. void  free_wrapper( void* );
  24. char *strdup_wrapper( const char* );
  25.  
  26. #define      MALLOC         malloc_wrapper
  27. #define     REALLOC        realloc_wrapper  
  28. #define      CALLOC         calloc_wrapper
  29. #define        FREE           free_wrapper
  30. #define      STRDUP         strdup_wrapper
  31. #define      ALLOCA         alloca_wrapper
  32.  
  33. #endif
  34. #endif
  35.